﻿using Inovout.Business;
using Inovout.SoftwareStudio.Models;
using Inovout.Services;
using System.Collections.Generic;

namespace Inovout.SoftwareStudio.Business
{
    public class SaveProductWorkItem : BaseWorkItem
    {
        private IRepositoryService<Product> productService;
        public SaveProductWorkItem(IRepositoryService<Product> productService)
        {
            this.productService = productService;
        }
        protected override void Run()
        {
            productService.Save(ViewData.Model as Product);
            base.Message("保存成功！");
        }

    }
}
